﻿using Myotragus.Data.Hbm;
using Myotragus.Data.Registration;
using Myotragus.Store.Model.Domain;
using NUnit.Framework;

namespace Myotragus.Store.Model.Tests
{
  [TestFixture]
  public class ResolvedMappingFixture
  {
    [SetUp]
    public void SetUp()
    {
      FixtureHelper.InitializeServices(ServicesImplementation.FromAssemblyContaining<IProduct>());
      var entitites = new[] { typeof(ICategory), typeof(IProduct) };
      FixtureHelper.InitializeEntities(entitites);
      FixtureHelper.InitializeSession(entitites);
    }

    [Test]
    public void ResolveEntities()
    {
      var resolver = FixtureHelper.Container.Resolve<IResolutionHbmGenerator>();

      var hbm = resolver.Generate(Mappings.CategoryProducts);
      FixtureHelper.AddMappings(hbm);
    }
  }
}
